package com.sx.micowell.module.collect

import android.graphics.Color
import android.view.View
import android.widget.ImageView
import com.bumptech.glide.Glide
import com.bumptech.glide.load.Transformation
import com.bumptech.glide.load.resource.bitmap.CenterCrop
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.miloyu.modelnet.response.HelpInfoVO
import com.miloyu.modelnet.response.LearnedCourseVO
import com.miloyu.modelnet.response.SysNotice
import com.miloyu.modelnet.response.getUrl
import com.sx.micowell.R

/**
 * @Author: YY
 * @Time: 2021/8/13
 * @Describe TODO
 */
class CollectListAdapter : BaseQuickAdapter<LearnedCourseVO, BaseViewHolder>(R.layout.item_collect_list) {

    override fun convert(holder: BaseViewHolder, item: LearnedCourseVO) {

        Glide.with(context).load( item.curriculumCover.getUrl())
            .into((holder.getView<View>(R.id.image_title) as ImageView))

        holder.setText(R.id.tv_title, item.curriculumTitle)
        holder.setText(R.id.tv_content, "${item.duration}分钟 · ${item.calorie}千卡 · ${item.basicConditions}" )

    }
}